package com.example.demo.service;

import com.example.demo.mapper.BookInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service

public class BookService {
    @Autowired
    private BookInfoMapper bookInfoMapper;

    @Transactional(propagation = Propagation.SUPPORTS)
    public Integer insert(String book_name,String book_author){
       int flag = bookInfoMapper.insert(book_name,book_author);
       return flag;
    }
}
